//
//  NurceTableViewCell.m
//  必争医疗
//
//  Created by 毕成 on 14-11-20.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "NurceTableViewCell.h"
#import "NurceModel.h"
@implementation NurceTableViewCell
- (void)dealloc
{
    [_title release];
    [_date release];
    [_doctor release];
    [_message release];
    [_more release];
    [_right release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.root = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
        [self.root setBackgroundColor:[UIColor grayColor]];
        [self.contentView addSubview:self.root];
        [self.root release];
        
        self.title = [[[UILabel alloc] initWithFrame:CGRectZero] autorelease];
        [self.title setBackgroundColor:[UIColor blueColor]];
        [self.root addSubview:self.title];
        
        self.date = [[[UILabel alloc] initWithFrame:CGRectZero] autorelease];
        [self.date setBackgroundColor:[UIColor yellowColor]];
        [self.root addSubview:self.date];
        
        self.doctor = [[[UIImageView alloc] initWithFrame:CGRectZero] autorelease];
        [self.doctor setBackgroundColor:[UIColor redColor]];
        [self.root addSubview:self.doctor];
        
        self.message = [[[UILabel alloc] initWithFrame:CGRectZero] autorelease];
        [self.message setBackgroundColor:[UIColor greenColor]];
        [self.root addSubview:self.message];
        
        self.more = [[[UILabel alloc] initWithFrame:CGRectZero] autorelease];
        [self.more setBackgroundColor:[UIColor blueColor]];
        [self.root addSubview:self.more];
        
        self.right = [[[UIImageView alloc] initWithFrame:CGRectZero] autorelease];
        [self.right setBackgroundColor:[UIColor greenColor]];
        [self.root addSubview:self.right];
        
        [self addObserver:self forKeyPath:@"model" options:NSKeyValueObservingOptionNew context:nil];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    [self.root setFrame:CGRectMake(10, 10, 355, 280)];
    [self.title setFrame:CGRectMake(0, 0, 355, 40)];
    [self.date setFrame:CGRectMake(0, 40, 355, 20)];
    [self.doctor setFrame:CGRectMake(0, 60, 355, 130)];
    [self.message setFrame:CGRectMake(0, 190, 355, 60)];
    [self.more setFrame:CGRectMake(0, 250, 355, 30)];
    

}

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
    
}









@end
